﻿public class BallInfo
{
        public int count = 3;
        public Vec3dInfo[] ball;
        public double[] r;
        public Vec3dInfo tag;

        public BallInfo()
                : this(3)
        {
        }

        public BallInfo(int size)
        {
                this.count = size;

                ball = new Vec3dInfo[count];
                r = new double[count];

                for (int i = 0; i < count; i++)
                {
                        ball[i] = new Vec3dInfo();
                        r[i] = new double();
                        r[i] = 0;
                }

                tag = new Vec3dInfo();
        }

        public override string ToString()
        {
                string info = "模型信息：\n";
                for (int i = 0; i < this.count; i++)
                {
                        info = info + "球" + i + "：(" + ball[i].x + "," + ball[i].y + "," + ball[i].z + ")\n";
                }
                info = info + "中心点：(" + tag.x + "," + tag.y + "," + tag.z + ")\n";
                return info;
        }
}
